#include <bits/stdc++.h>
using namespace std;
void benchmark(const string &name, const auto &func) {
  auto start = chrono::high_resolution_clock::now();
  func();
  auto end = chrono::high_resolution_clock::now();
  auto duration = chrono::duration_cast<chrono::milliseconds>(end - start);
  cout << format("{} execution time: {} ms\n", name, duration.count());
}

int main() {
  int n = 100000000;
  benchmark("normal", [&]() {
    // 8
    // 0 1 2 3 4 5 6 7
    // 16 
    // 0 1 2 3 4 5 6 7 (copy) 8
    // 32
    // 64 .... O(n)
    vector<int> vec;
    for (int i = 0; i < n; i ++) {
      vec.push_back(rand());
    }
  });

  benchmark("reserve", [&]() {
    vector<int> vec;
    vec.reserve(n);
    for (int i = 0; i < n; i ++) {
      vec.push_back(rand());
    }
  });
}